package org.szgb.console.zx.dashboard.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.List;

@Data
public class ZxDashboard {
    private Integer finishNum;
    private Integer unfinishNum;
    private Integer waitNum;
    private List<ZxPlanTypeNum> planTypeNumList;
    private List<ZxPlanBoardView> planBoardViewList;
    private List<ZxTaskDaily> taskDailyList;
    private List<ZxPlanNear> planNearList;
    private List<ZxTaskToday> taskTodayList;


    @Data
    public static class ZxPlanTypeNum {
        private Integer type;
        private Integer num;
    }

    @Data
    public static class ZxPlanBoardView {
        private String id;
        private String name;
        private Integer status;
    }

    @Data
    public static class ZxTaskDaily {
        @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private LocalDate localDate;
        private Integer number;
    }

    @Data
    public static class ZxTaskToday {
        private String id;
        private String locationId;
        private String locationName;
        private String planId;
        private String planName;
        private String status;
    }

    @Data
    public static class ZxPlanNear {
        private String id;
        private String name;
        @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private LocalDate startAt;
        @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private LocalDate endAt;
        private List<ZxTaskNear> taskNearList;

    }

    @Data
    public static class ZxTaskNear {
        private Integer number;
        private String status;
        private List<LocationNear> locationNearList;
    }

    @Data
    public static class LocationNear {
        private String id;
        private String name;
    }
}
